home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
cnet
/
cnettoolkit2a.lha
/
FPButton
< prev
next >
Wrap
Text File
|
1994-12-16
|
6KB
|
111 lines
/**************************************************************************\
$VER: FPButton 1.01 (27.03.94) by PMK
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
tog.0='No ';tog.1='Yes'
cyc.0='Arexx ';cyc.1='CNet C ';cyc.2='DOS ';cyc.3='Paragon';cyc.4='Text '
xc.1= 4;yc.1= 1;ml.1=0;mr.1=0;mu.1=11;md.1=2;but.1='c7z4<<Exit z0c7 ';bty.1=0
xc.2= 6;yc.2= 1;ml.2=0;mr.2=0;mu.2=1;md.2=3;but.2='c7z4Item type :z0c7 ';bty.2=3;ans.2=0 ;mc.2=5 ;cnm.2='cyc'
xc.3= 7;yc.3= 1;ml.3=0;mr.3=0;mu.3=2;md.3=4;but.3='c7z4DOS filename:z0c7 ';bty.3=2;ans.3='PFiles:' ;le.3='4 35'
xc.4= 8;yc.4= 1;ml.4=0;mr.4=0;mu.4=3;md.4=5;but.4='c7z4Arguments :z0c7 ';bty.4=2;ans.4='' ;le.4='4 20'
xc.5= 9;yc.5= 1;ml.5=0;mr.5=0;mu.5=4;md.5=6;but.5='c7z4Activate key:z0c7 ';bty.5=2;ans.5='' ;le.5='4 1'
xc.6=11;yc.6= 1;ml.6=0;mr.6=0;mu.6=5;md.6=7;but.6='c7z4One user at a time :z0c7 ';bty.6=1;ans.6=0
xc.7=12;yc.7= 1;ml.7=9;mr.7=9;mu.7=6;md.7=8;but.7='c7z4Disable MCI :z0c7 ';bty.7=1;ans.7=0
xc.8=13;yc.8= 1;ml.8=10;mr.8=10;mu.8=7;md.8=11;but.8='c7z4Disable More? :z0c7 ';bty.8=1;ans.8=0
xc.9=12;yc.9=40;ml.9=7;mr.9=7;mu.9=11;md.9=10;but.9='c7z4Disable word-wrap :z0c7 ';bty.9=1;ans.9=0
xc.10=13;yc.10=40;ml.10=8;mr.10=8;mu.10=9;md.10=11;but.10='c7z4Disable sysop MCI :z0c7 ';bty.10=1;ans.10=0
xc.11=2;yc.11=1;ml.11=0;mr.11=0;mu.11=8;md.11=1;but.11='c7z4<<Delete entry z0c7 ';bty.11=0
xc.51=3;yc.51= 2;ml.51=0;mr.51=52;mu.51=0;md.51=0;but.51='c7z4Save changes z0c7 ' ;bty.51=0
xc.52=3;yc.52=16;ml.52=51;mr.52=0;mu.52=0;md.52=0;but.52='c7z4Exit without saving z0c7 ' ;bty.52=0
xc.71=3;yc.71= 2;ml.71=0;mr.71=72;mu.71=0;md.71=0;but.71='c7z4Delete entry z0c7 ' ;bty.71=0
xc.72=3;yc.72=16;ml.72=71;mr.72=0;mu.72=0;md.72=0;but.72='c7z4Return to editor z0c7 ' ;bty.72=0
nb=11 /* Number of buttons */
bn=1 /* Number of 1st button */
bu=2 /* Button to place cursor on as default */
call DISBUT
do until exi=1 /* Main Loop */
key=CHECK(GETCURSOR());oldbu=bu;select
when key=8&mu.bu>0 then call MOVE(mu.bu) /* Up */
when key=2&md.bu>0 then call MOVE(md.bu) /* Down */
when key=4&ml.bu>0 then call MOVE(ml.bu) /* Left */
when key=6&mr.bu>0 then call MOVE(mr.bu) /* Right */
when key='!' then exit /* Panic Exit */
when key='0d'x then select /* Return */
when bty.bu=0 then interpret('Call BUTTON'bu) /* Action Button */
when bty.bu=1 then do /* Toggle Button */
ans.bu=ans.bu=0;transmit at(xc.bu,yc.bu+length(but.bu)-12)'c3'value('tog.'ans.bu);end
when bty.bu=2 then do /* String Button */
/* The 12 is the number of MCI codes in the Button string -1 */
transmit at(xc.bu,yc.bu+length(but.bu)-12)'c3L1305640 #'ans.bu'}I'le.bu'}'
getuser 70;ans.bu=result;end
when bty.bu=3 then do /* Cycle Button */
ans.bu=(ans.bu+1)*((ans.bu+1)<mc.bu);transmit at(xc.bu,yc.bu+length(but.bu)-12)'c3'value(cnm.bu'.'ans.bu);end
otherwise do;Transmit 'f1n1No button-type defined for button #'bu' - Exiting!';exit;end
end
otherwise nop
end
end
exit
/* Code for Action buttons! */
BUTTON1:
nb=2 /* Number of buttons */
bn=51 /* Number of 1st button */
bu=51 /* Button to place cursor on as default */
call DISBUT;return
BUTTON11:
nb=2 /* Number of buttons */
bn=71 /* Number of 1st button */
bu=72 /* Button to place cursor on as default */
call DISBUT;return
BUTTON51:;Transmit 'f1Saving!!!';exi=1;return
BUTTON52:;Transmit 'f1Exiting!!!';exi=1;return
BUTTON71:;Transmit 'f1Deleting button!!!';exi=1;return
BUTTON72:
nb=11 /* Number of buttons */
bn=1 /* Number of 1st button */
bu=2 /* Button to place cursor on as default */
call DISBUT;return
/* Setup/Display Buttons */
DISBUT:;transmit 'f1>45}c4z7Flux Point VisualDataEditor z0n1>45}z7Use cursor keys; ENTER to selectz0c7'
oldbu=bu;do a=bn to nb+bn-1;sendstring at(xc.a,yc.a)but.a'c3'
select;when bty.a=1 then transmit value('tog.'ans.a);when bty.a=2 then transmit ans.a
when bty.a=3 then transmit value(cnm.a'.'ans.a);otherwise nop;end;end
/* The line below places "cursor" on the default button */
transmit at(xc.bu,yc.bu)'r1'but.bu'r0';return
MOVE:;bu=arg(1);transmit at(xc.oldbu,yc.oldbu)but.oldbu||at(xc.bu,yc.bu)'r1'but.bu'r0';return
/* The following four routines are right from the CNet Amiga ToolKit! */
AT:;return ''arg(1)';'arg(2)'H'
GETCURSOR:
do until key~='NOCHAR';maygetchar;key=result;end
if key~='1B'x then return key;maygetchar;key=result
if key="[" then do;maygetchar;key=result;end
if key='A' then return '8';if key='B' then return '2'
if key='C' then return '6';if key='D' then return '4'
return key
CHECK:;if ARG()&ARG(1)~='###PANIC' then return ARG(1)
getcarrier;if result='TRUE' then if ARG() then return ARG(1);else return
logentry 'Lost Carrier in FPBAM!!';bufferflush;exit
SYNTAX:;ERROR:;IOERR:;er=rc' ('errortext(rc)') in line 'sigl
getuser 1311992;a=result;getuser 1311960;b='"'a||result'"';er='Error Code 'er' of 'b
transmit er;if length(er)>46 then do;er1=left(er,46);er=substr(er,47);logentry er1;end
logentry er;bufferflush;exit
/** Last Edited: 16-Dec-94 ************************************************\
\************************************ FLUX POINT AMIGA BBS +45 3526 2527 **/